package 复合模式;

public class DuckQuackCount implements Duck {
    public static int count;
    public Duck duck;

    public DuckQuackCount(Duck duck) {
        this.duck = duck;
    }

    @Override
    public void quack() {
        duck.quack();
        count++;
    }

}
